package com.prs.crm.domain.doc;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
@Entity
@Table(name="doc_docSendWork")
public class DocSendWork extends BaseEntity {

private static final long serialVersionUID = -8148256415530888431L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	private String docName;
	
	private String docCode;

	private String dockeyWord;
	
	@ManyToOne(fetch = FetchType.LAZY)
	private DocTaskSend docTaskSend;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade( { org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Attachment attach;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDocName() {
		return docName;
	}

	public void setDocName(String docName) {
		this.docName = docName;
	}

	public String getDocCode() {
		return docCode;
	}

	public void setDocCode(String docCode) {
		this.docCode = docCode;
	}

	public String getDockeyWord() {
		return dockeyWord;
	}

	public void setDockeyWord(String dockeyWord) {
		this.dockeyWord = dockeyWord;
	}

	public DocTaskSend getDocTaskSend() {
		return docTaskSend;
	}

	public void setDocTaskSend(DocTaskSend docTaskSend) {
		this.docTaskSend = docTaskSend;
	}

	public Attachment getAttach() {
		return attach;
	}

	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	
}
